<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>登录</title>
<link href="http://localhost/ci/css/style_web.css" media="screen, projection" rel="stylesheet" type="text/css">
<script src="http://localhost/633games/formvalidator/jquery-1.4.4.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("#button").click(function(){
	  
	  var username = $('#username1').val();
	  var password = $('#password1').val();
	 $.ajax({
	 type : 'POST',
	 dataType: "json",   
	 url:"http://localhost/633games/index.php/login/log",
	 data:{username1:username,password1:password},
	 async:false,
	 success : function(data){
		 //alert(data);
        if(data==1){
            alert('登录成功');
          window.location.href="http://localhost/633games/index.php/welcome/index";
           //return false;
		}else{
			 alert('登录失败');
			 window.location.href='http://localhost/633games/index.php/login/index';
          //  return false;
            
		}
        
	 },
       
	 });
	return false;
	 
  });
});
</script>
</head>
<body>
<div class="sign">
<div class="logo"><a href="http://localhost/633games/index.php/welcome/index" title="返回首页"></a></div>
<div class="block">
<!--<div id="error"></div>-->

<form action="log" method="post" id="form1">
<div><span></span></div>
<label>用户名或邮箱</label>
<input id="username1" name="username1" placeholder="用户名或邮箱" type="text">
<label>密码</label>
<input id="password1" name="password1" placeholder="密码" type="password">
<input name="remember_me" id="remember_me" value="1" checked="checked" type="checkbox">
<button type="submit" name="submit" id="button">登录</button>
</form>
<div class="note">
<a href="http://www.qiushibaike.com/new4/fetchpass">找回密码</a> |
<a href="signup">注册帐号，体验精彩糗百！</a>
</div>
</div>
</div>




</body></html>